package com.ruoyi.project.business.service.impl;



import java.util.List;

import com.ruoyi.common.utils.DateUtils;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;

import com.ruoyi.project.business.mapper.BusinessFarmServiceMapper;

import com.ruoyi.project.business.domain.BusinessFarmService;

import com.ruoyi.project.business.service.IBusinessFarmServiceService;



/**

 * 农田服务Service业务层处理

 * 

 * @author ruoyi

 * @date 2020-10-21

 */

@Service

public class BusinessFarmServiceServiceImpl implements IBusinessFarmServiceService 

{

    @Autowired

    private BusinessFarmServiceMapper businessFarmServiceMapper;



    /**

     * 查询农田服务

     * 

     * @param id 农田服务ID

     * @return 农田服务

     */

    @Override

    public BusinessFarmService selectBusinessFarmServiceById(Long id)

    {

        return businessFarmServiceMapper.selectBusinessFarmServiceById(id);

    }



    /**

     * 查询农田服务列表

     * 

     * @param businessFarmService 农田服务

     * @return 农田服务

     */

    @Override

    public List<BusinessFarmService> selectBusinessFarmServiceList(BusinessFarmService businessFarmService)

    {

        return businessFarmServiceMapper.selectBusinessFarmServiceList(businessFarmService);

    }



    /**

     * 新增农田服务

     * 

     * @param businessFarmService 农田服务

     * @return 结果

     */

    @Override

    public int insertBusinessFarmService(BusinessFarmService businessFarmService)

    {

        businessFarmService.setCreateTime(DateUtils.getNowDate());

        return businessFarmServiceMapper.insertBusinessFarmService(businessFarmService);

    }



    /**

     * 修改农田服务

     * 

     * @param businessFarmService 农田服务

     * @return 结果

     */

    @Override

    public int updateBusinessFarmService(BusinessFarmService businessFarmService)

    {

        businessFarmService.setUpdateTime(DateUtils.getNowDate());

        return businessFarmServiceMapper.updateBusinessFarmService(businessFarmService);

    }



    /**

     * 批量删除农田服务

     * 

     * @param ids 需要删除的农田服务ID

     * @return 结果

     */

    @Override

    public int deleteBusinessFarmServiceByIds(Long[] ids)

    {

        return businessFarmServiceMapper.deleteBusinessFarmServiceByIds(ids);

    }



    /**

     * 删除农田服务信息

     * 

     * @param id 农田服务ID

     * @return 结果

     */

    @Override

    public int deleteBusinessFarmServiceById(Long id)

    {

        return businessFarmServiceMapper.deleteBusinessFarmServiceById(id);

    }

}
